<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="button" id="btn" value="选择">
    <select id="star">
        <option>李易峰</option>
        <option>肖战</option>
        <option>王一博</option>
        <option>刘亦菲</option>
        <option>赵丽颖</option>
        <option>刘宇宁</option>
        <option>赵露思</option>
    </select>
    <script>
        var btn = document.getElementById("btn");
        var star = document.getElementById("star");
        var opts = star.children;
        btn.onclick = function () {
            var n = Math.floor(Math.random() * opts.length);
            // console.log(n);
            opts[n].selected = true;
        };
    </script>
</body>

</html>